Skip to content

feat(validators): support check-failing-tests in data-paths mode + --update-expected#84

Merged
jdsika merged 2 commits into
mainfrom
feat/check-failing-tests-data-paths
Jul 17, 2026
Merged

feat(validators): support check-failing-tests in data-paths mode + --update-expected#84
jdsika merged 2 commits into
mainfrom
feat/check-failing-tests-data-paths

Conversation

@jdsika

@jdsika jdsika commented Jul 16, 2026

Copy link
Copy Markdown

What & why

Two small, additive, default-off improvements to validation_suite so that a
downstream repository can validate its OWN JSON-LD instances (positive and
negative) against an external artifact bundle, without duplicating OMB's runner,
report formatter or snapshot logic.

1. check-failing-tests now works in Data Path Mode

Previously check-failing-tests was Catalog/Domain Mode only. It now also runs
against externally-supplied fixtures passed via --data-paths:
create_temporary_domain classifies each file by the name of its parent
directory
-- files under an invalid/ directory are registered as invalid
test-data (matching OMB's own tests/data/{domain}/{valid,invalid}/ convention),
everything else as valid. Temporary test ids now include the test_type so
the valid/invalid groups can never collide on a catalog key.

Only check-artifact-coherence remains unsupported in data-paths mode (it needs
the full catalog structure).

2. --update-expected snapshot recorder

check-failing-tests --update-expected (re)records each negative test's
.expected snapshot from the live boxed validation report instead of comparing.
Intended for use after an intentional schema or OMB/pyshacl change, then review the
diff. When the flag is unset, behaviour is byte-for-byte unchanged.

Behaviour note

A check-data-conformance run over files that live under a directory literally
named invalid will now treat them as negative fixtures (skipped as conformance
targets) rather than positive ones. This matches the repository's {valid,invalid}
convention and only affects that exact directory name.

Testing

  • ruff check + ruff format clean.
  • Full existing suite green: pytest tests/unit tests/integration -> 471 passed,
    1 xfailed (no regressions; the new paths are exercised by a downstream consumer).

jdsika added 2 commits July 16, 2026 20:33
…update-expected

Enable check-failing-tests to run against externally-supplied negative fixtures
in Data Path Mode (previously Catalog/Domain Mode only), and add an
--update-expected flag to (re)record each .expected snapshot from the live
validation report.

- registry_resolver.create_temporary_domain: classify each --data-paths file by
  its parent directory name -- files under invalid/ register as invalid
  test-data (matching OMB's tests/data/{domain}/{valid,invalid}/ convention),
  all others as valid. Temporary test ids now include the test_type so the two
  groups never collide on a catalog key.
- validation_suite: relax the data-paths guard so only check-artifact-coherence
  stays unsupported; thread update_expected through check_failing_tests_all (on
  a 210 it writes the boxed report to <fixture>.expected, else compares as
  before). Default-off: zero behaviour change when the flag is unset.
…aa7702c

The committed openlabel-v2 artifacts predate gen-owl/gen-shacl changes now
present in the pinned fork (feat/envited-x-pipeline @ 6aa7702c). CI's
make generate + "verify no changes", and the generate-linkml pre-commit hook,
regenerate them and fail on the diff. Refresh so committed == generated:

- SHACL: boolean flag comparison str(?flag) != "true" -> ?flag != true (compare
  against xsd:boolean rather than a string); templated sh:message no longer
  carries an @en tag; deterministic constraint re-ordering.
- OWL: enum range emitted as owl:oneOf ( "EdgeNone" ) instead of a bare
  xsd:string restriction.

No schema or tooling change; make generate is now a no-op. This drift is
pre-existing on main (unrelated to the check-failing-tests tooling on this
branch); refreshing here unblocks the Generate Artifacts and Standards & Syntax
checks.
@jdsika
jdsika merged commit 9ac9106 into main Jul 17, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant